

/**
 * 
 * 
 * API:
 * ---------------
 * getBPMObjectType()
 * fromXML(xmlNode)
 * 
 */
(function(global){
    'use strict';
    const logger = WorkflowUtil.newLogger("WorkflowApp/BPMAndRouter");

    let BPMAndRouter = function () {

        BPMAndRouter.__super__.constructor.apply(this, arguments);

        //如果是split点这里为true, 其他这里为false
        this.addAttr("start", "", "p");
        this.addAttr("parallelismNodeId", "", "o");


        //split, join 节点没有actor
        this.actor = null;

        // 标记最后一根线和最后一根线的ID
        this.firstLineId = null;
        this.lastLineId = null;
    };
    //继承
    WorkflowUtil.extend(BPMAndRouter, global.BPMAbstractNode);

    
    BPMAndRouter.prototype.getBPMObjectType = function(){
        return WorkflowConstant.bpmObjType.BPMAndRouter;
    };
    
    BPMAndRouter.prototype.getFirstLineId = function(){
        return this.firstLineId;
    };
    
    BPMAndRouter.prototype.setFirstLineId = function(firstLineId){
        if(this.firstLineId == null){
            this.firstLineId = firstLineId;
        }
    };
    
    BPMAndRouter.prototype.getLastLineId = function(){
        return this.lastLineId;
    };
    
    BPMAndRouter.prototype.setLastLineId = function(lastLineId){
        this.lastLineId = lastLineId;
    };
    
    /**
     * 解析xml
     * @param xmlNode
     */
    BPMAndRouter.prototype.fromXML = function(xmlNode){
        
        
      //解析节点属性
        this.transXMLNode2BPMObject(xmlNode);
        
        //调用父类节点解析
        BPMAndRouter.__super__.fromXML.apply(this, [xmlNode]);
    };
    
    
    global.BPMAndRouter = BPMAndRouter;
    
})(WorkflowApp);